package com.ihg.hiex.admin.dao.session;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.ihg.hiex.entity.session.Session;
import com.ihg.hiex.entity.session.participator.SessionFacilitator;

/**
 * 主讲师
 *
 * @author Ark
 *
 */
@Dao("hibernate")
public interface SessionFacilitatorDao {

    /**
     * @param session
     * @return
     */
    @Query("FROM SessionFacilitator WHERE disabled = false AND session = :session")
    public List<SessionFacilitator> list(@Variable("session") Session session);

    /**
     * @param session
     * @param email
     * @return
     */
    @Query("FROM SessionFacilitator WHERE disabled = false AND session = :session AND email = :email")
    public SessionFacilitator loadByEmail(@Variable("session") Session session, @Variable("email") String email);
    
}
